package com.xd.auth.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xd.common.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
* 授权所生成的code数据
*/
@ApiModel(value="OauthCode")
@Data
@TableName(value = "oauth_code")
public class OauthCode  implements Serializable {
    private static final long serialVersionUID = -8127859841154049488L;
    /**
     * 存储服务端系统生成的code的值(未加密).
     */
    @TableField(value = "code")
    @ApiModelProperty(value="存储服务端系统生成的code的值(未加密).")
    private String code;

    /**
     * 存储将AuthorizationRequestHolder.java对象序列化后的二进制数据.
     */
    @TableField(value = "authentication")
    @ApiModelProperty(value="存储将AuthorizationRequestHolder.java对象序列化后的二进制数据.")
    private byte[] authentication;

    public static final String COL_CODE = "code";

    public static final String COL_AUTHENTICATION = "authentication";
}
